Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add retry for ULN authentication #3892

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hstct
Copy link
Contributor

@hstct hstct commented Feb 19, 2025

closes #3891

Raises:
UlnCredentialsError: If all login attempts fail.
"""
for attempt in range(1, max_attempts + 1):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW we do have the backoff crate for this which we already use in pulpcore: https://github.com/pulp/pulpcore/blob/139955c975af0c4bbaad2096f25808206b4d67a3/pulpcore/download/http.py#L250

With that said, this code isn't complex, I'm unsure whether we actually care to pull in a new dependency to the RPM plugin that may conflict with pulpcore at some point if we're not careful

Does the connection seem to drop specifically on the login attempt, but not during the downloads themselves? Or I suppose presumably the existing retry logic might be handling that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ggainey Do you have an opinion. I'm a bit partial to leaving it as-is

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I would prefer to keep the default number of retries consistent with RpmRemote, so 4.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the connection seem to drop specifically on the login attempt, but not during the downloads themselves? Or I suppose presumably the existing retry logic might be handling that.

Yes the connection drops on the login attempt. This happens a lot during a sync and will throw an error. Adding the login retry fixes the issue.

Also I would prefer to keep the default number of retries consistent with RpmRemote, so 4.

I can change this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client connection drops during ULN syncs
3 participants